package com.lagou.module01.entity;

import java.io.Serializable;
import java.text.SimpleDateFormat;


public class Student implements Serializable {
    private static final long serialVersionUID = -4309894913689650449L;
    private int sid;  //学号
    private String name;  //姓名
    private String sex;  //性别
    private String birthday;  //出生日期
    private String email;  //邮箱
    private String remark;  //备注

    public Student() {
    }

    public Student(int sid, String name, String sex, String birthday, String email, String remark) {
        this.sid = sid;
        this.name = name;
        this.sex = sex;
        this.birthday = birthday;
        this.email = email;
        this.remark = remark;
    }

    public Student(String name, String sex, String birthday, String email, String remark) {
        this.name = name;
        this.sex = sex;
        this.birthday = birthday;
        this.email = email;
        this.remark = remark;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        this.birthday = sdf.format(birthday);
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "Student{" +
                "sid=" + sid +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", birthday=" + birthday +
                ", email='" + email + '\'' +
                ", remark='" + remark + '\'' +
                '}';
    }
}
